<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Pictures</title>
</head>

<body>
	<form action="upload.htm" method="post" enctype="multipart/form-data">
		<table width="60%" border="0" cellspacing="0">
			<tr>
				<td width="35%"><strong>File to upload</strong>
				</td>
				<td width="65%"><input type="file" name="file" />
				</td>
			</tr>
			<tr>
				<td><strong>Notes</strong>
				</td>
				<td><input type="text" name="notes" width="60" />
				</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td><input type="submit" name="submit" value="Add" />
				</td>
			</tr>
		</table>
	</form>
	<br></br>
	<table border="1" cellspacing="0">
		<thead>
			<th>Initial Name</th>
			<th>Storage Path</th>
			<th>File Type</th>
			<th>Description</th>
			<th>Action</th>
		</thead>

		<c:forEach var="pic" items="${pictures}">
			<tr>
				<td><c:out value="${pic.initialName}" />
				</td>
				<td><c:out value="${pic.storagePath}" />
				</td>
				<td><c:out value="${pic.type}" />
				</td>
				<td><c:out value="${pic.description}" />
				</td>
				<td><div align="center">
						<a href="download.htm?id=${pic.id}">
						<img src="download.htm?id=${pic.id}&thumb=true"/> 
						</a>
					</div>
				</td>
			</tr>
		</c:forEach>

	</table>

	<!-- 
        <a href="<c:url value="/upload.htm"/>">Upload</a>
		 -->


</body>
</html>
